<template>
  <div class="footerWrapper">
    <div  class="footer">
    <el-button  @click="backMain" v-if="btnData.btnLeft.show">{{btnData.btnLeft.name}}</el-button>
    <el-button type="primary" @click="submitForm" v-if="btnData.btnRight.show">{{btnData.btnRight.name}}</el-button>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    btnData: {
      btnLeft: {
        show: {
          default: true
        },
        name: {
          default: '返回'
        }
      },
      btnRight: {
        show: {
          default: true
        },
        name: {
          default: '提交'
        }
      }
    }
  },
  computed: {
  },
  watch: {
  },
  data() {
    return {
    }
  },
  methods: {
    submitForm() {
      this.$emit('submitForm', 'submitForm')
    },
    backMain() {
      this.$emit('backMain', 'backMain')
    }
  }
}
</script>

<style lang="scss">
  /*底部组件footer*/
  .footerWrapper {
    margin-bottom: 20px;
    .footer {
      width: 200px;
      margin:0 auto;
      text-align: center;
    }
  }
</style>
